package io.gitee.yth.design.pattern.test.core.pattern.creational.factory.pizzafactory;

import io.gitee.yth.design.pattern.test.core.pattern.creational.factory.pizza.ChicagoStyleCheesePizza;
import io.gitee.yth.design.pattern.test.core.pattern.creational.factory.pizza.ChicagoStylePepperPizza;
import io.gitee.yth.design.pattern.test.core.pattern.creational.factory.pizza.Pizza;

/**
 * @author yth
 * @since 2023-04-17-14:02
 */
public class ChicagoPizzaFactory implements IPizzaFactory {
    @Override
    public Pizza createPizza(String orderType) {
        switch (orderType) {
            case "cheese":
                return new ChicagoStyleCheesePizza();
            case "pepper":
                return new ChicagoStylePepperPizza();
            default:
                return null;
        }
    }
}
